import request from '@/utils/request'

// 查询绩效考核结果列表
export function listAppraisal(query) {
  return request({
    url: '/operations/appraisal/list',
    method: 'get',
    params: query
  })
}

// 查询绩效考核结果详细
export function getAppraisal(appraisalId) {
  return request({
    url: '/operations/appraisal/' + appraisalId,
    method: 'get'
  })
}

// 新增绩效考核结果
export function addAppraisal(data) {
  return request({
    url: '/operations/appraisal',
    method: 'post',
    data: data
  })
}

// 修改绩效考核结果
export function updateAppraisal(data) {
  return request({
    url: '/operations/appraisal',
    method: 'put',
    data: data
  })
}

// 删除绩效考核结果
export function delAppraisal(appraisalId) {
  return request({
    url: '/operations/appraisal/' + appraisalId,
    method: 'delete'
  })
}

// 生成绩效考核
export function generateAppraisal(data) {
  return request({
    url: '/operations/appraisal/generate',
    method: 'post',
    data: data
  })
}
